import thunk from 'redux-thunk';  // 异步请求数据
import { createStore, compose, applyMiddleware, combineReducers } from 'redux';

const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;  // 启用redux 调试面板
import reducer from "./reducer";


const store = createStore(reducer, composeEnhancers(applyMiddleware(thunk)));

// const store = createStore(combineReducers({
//     main: mainReducer,
// }),composeEnhancers(applyMiddleware(thunk)))

export default store;